(0) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1).


The TRS R consists of the following rules:

rev_l#2(x8, x10) → Cons(x10, x8)
step_x_f#1(rev_l, x5, step_x_f(x2, x3, x4), x1) → step_x_f#1(x2, x3, x4, rev_l#2(x1, x5))
step_x_f#1(rev_l, x5, fleft_op_e_xs_1, x3) → rev_l#2(x3, x5)
foldr#3(Nil) → fleft_op_e_xs_1
foldr#3(Cons(x16, x6)) → step_x_f(rev_l, x16, foldr#3(x6))
main(Nil) → Nil
main(Cons(x8, x9)) → step_x_f#1(rev_l, x8, foldr#3(x9), Nil)

Rewrite Strategy: INNERMOST

(1) TrsToWeightedTrsProof (BOTH BOUNDS(ID, ID) transformation)

Transformed TRS to weighted TRS

(2) Obligation:

The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^1).


The TRS R consists of the following rules:

rev_l#2(x8, x10) → Cons(x10, x8) [1]
step_x_f#1(rev_l, x5, step_x_f(x2, x3, x4), x1) → step_x_f#1(x2, x3, x4, rev_l#2(x1, x5)) [1]
step_x_f#1(rev_l, x5, fleft_op_e_xs_1, x3) → rev_l#2(x3, x5) [1]
foldr#3(Nil) → fleft_op_e_xs_1 [1]
foldr#3(Cons(x16, x6)) → step_x_f(rev_l, x16, foldr#3(x6)) [1]
main(Nil) → Nil [1]
main(Cons(x8, x9)) → step_x_f#1(rev_l, x8, foldr#3(x9), Nil) [1]

Rewrite Strategy: INNERMOST

(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(4) Obligation:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

rev_l#2(x8, x10) → Cons(x10, x8) [1]
step_x_f#1(rev_l, x5, step_x_f(x2, x3, x4), x1) → step_x_f#1(x2, x3, x4, rev_l#2(x1, x5)) [1]
step_x_f#1(rev_l, x5, fleft_op_e_xs_1, x3) → rev_l#2(x3, x5) [1]
foldr#3(Nil) → fleft_op_e_xs_1 [1]
foldr#3(Cons(x16, x6)) → step_x_f(rev_l, x16, foldr#3(x6)) [1]
main(Nil) → Nil [1]
main(Cons(x8, x9)) → step_x_f#1(rev_l, x8, foldr#3(x9), Nil) [1]

The TRS has the following type information:
rev_l#2 :: Cons:Nil → a → Cons:Nil
Cons :: a → Cons:Nil → Cons:Nil
step_x_f#1 :: rev_l → a → step_x_f:fleft_op_e_xs_1 → Cons:Nil → Cons:Nil
rev_l :: rev_l
step_x_f :: rev_l → a → step_x_f:fleft_op_e_xs_1 → step_x_f:fleft_op_e_xs_1
fleft_op_e_xs_1 :: step_x_f:fleft_op_e_xs_1
foldr#3 :: Cons:Nil → step_x_f:fleft_op_e_xs_1
Nil :: Cons:Nil
main :: Cons:Nil → Cons:Nil

Rewrite Strategy: INNERMOST

(5) CompletionProof (UPPER BOUND(ID) transformation)

The transformation into a RNTS is sound, since:

(a) The obligation is a constructor system where every type has a constant constructor,

(b) The following defined symbols do not have to be completely defined, as they can never occur inside other defined symbols:


step_x_f#1
main

(c) The following functions are completely defined:

foldr#3
rev_l#2

Due to the following rules being added:
none

And the following fresh constants:

const

(6) Obligation:

Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

rev_l#2(x8, x10) → Cons(x10, x8) [1]
step_x_f#1(rev_l, x5, step_x_f(x2, x3, x4), x1) → step_x_f#1(x2, x3, x4, rev_l#2(x1, x5)) [1]
step_x_f#1(rev_l, x5, fleft_op_e_xs_1, x3) → rev_l#2(x3, x5) [1]
foldr#3(Nil) → fleft_op_e_xs_1 [1]
foldr#3(Cons(x16, x6)) → step_x_f(rev_l, x16, foldr#3(x6)) [1]
main(Nil) → Nil [1]
main(Cons(x8, x9)) → step_x_f#1(rev_l, x8, foldr#3(x9), Nil) [1]

The TRS has the following type information:
rev_l#2 :: Cons:Nil → a → Cons:Nil
Cons :: a → Cons:Nil → Cons:Nil
step_x_f#1 :: rev_l → a → step_x_f:fleft_op_e_xs_1 → Cons:Nil → Cons:Nil
rev_l :: rev_l
step_x_f :: rev_l → a → step_x_f:fleft_op_e_xs_1 → step_x_f:fleft_op_e_xs_1
fleft_op_e_xs_1 :: step_x_f:fleft_op_e_xs_1
foldr#3 :: Cons:Nil → step_x_f:fleft_op_e_xs_1
Nil :: Cons:Nil
main :: Cons:Nil → Cons:Nil
const :: a

Rewrite Strategy: INNERMOST

(7) NarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Narrowed the inner basic terms of all right-hand sides by a single narrowing step.

(8) Obligation:

Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

rev_l#2(x8, x10) → Cons(x10, x8) [1]
step_x_f#1(rev_l, x5, step_x_f(x2, x3, x4), x1) → step_x_f#1(x2, x3, x4, Cons(x5, x1)) [2]
step_x_f#1(rev_l, x5, fleft_op_e_xs_1, x3) → rev_l#2(x3, x5) [1]
foldr#3(Nil) → fleft_op_e_xs_1 [1]
foldr#3(Cons(x16, x6)) → step_x_f(rev_l, x16, foldr#3(x6)) [1]
main(Nil) → Nil [1]
main(Cons(x8, Nil)) → step_x_f#1(rev_l, x8, fleft_op_e_xs_1, Nil) [2]
main(Cons(x8, Cons(x16', x6'))) → step_x_f#1(rev_l, x8, step_x_f(rev_l, x16', foldr#3(x6')), Nil) [2]

The TRS has the following type information:
rev_l#2 :: Cons:Nil → a → Cons:Nil
Cons :: a → Cons:Nil → Cons:Nil
step_x_f#1 :: rev_l → a → step_x_f:fleft_op_e_xs_1 → Cons:Nil → Cons:Nil
rev_l :: rev_l
step_x_f :: rev_l → a → step_x_f:fleft_op_e_xs_1 → step_x_f:fleft_op_e_xs_1
fleft_op_e_xs_1 :: step_x_f:fleft_op_e_xs_1
foldr#3 :: Cons:Nil → step_x_f:fleft_op_e_xs_1
Nil :: Cons:Nil
main :: Cons:Nil → Cons:Nil
const :: a

Rewrite Strategy: INNERMOST

(9) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID) transformation)

Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction.
The constant constructors are abstracted as follows:

rev_l => 0
fleft_op_e_xs_1 => 0
Nil => 0
const => 0

(10) Obligation:

Complexity RNTS consisting of the following rules:

foldr#3(z) -{ 1 }→ 0 :|: z = 0
foldr#3(z) -{ 1 }→ 1 + 0 + x16 + foldr#3(x6) :|: z = 1 + x16 + x6, x6 >= 0, x16 >= 0
main(z) -{ 2 }→ step_x_f#1(0, x8, 0, 0) :|: x8 >= 0, z = 1 + x8 + 0
main(z) -{ 2 }→ step_x_f#1(0, x8, 1 + 0 + x16' + foldr#3(x6'), 0) :|: z = 1 + x8 + (1 + x16' + x6'), x8 >= 0, x6' >= 0, x16' >= 0
main(z) -{ 1 }→ 0 :|: z = 0
rev_l#2(z, z') -{ 1 }→ 1 + x10 + x8 :|: z = x8, x8 >= 0, z' = x10, x10 >= 0
step_x_f#1(z, z', z'', z1) -{ 2 }→ step_x_f#1(x2, x3, x4, 1 + x5 + x1) :|: x5 >= 0, x4 >= 0, x1 >= 0, z'' = 1 + x2 + x3 + x4, z1 = x1, z' = x5, z = 0, x2 >= 0, x3 >= 0
step_x_f#1(z, z', z'', z1) -{ 1 }→ rev_l#2(x3, x5) :|: z'' = 0, x5 >= 0, z' = x5, z1 = x3, z = 0, x3 >= 0

(11) InliningProof (UPPER BOUND(ID) transformation)

Inlined the following terminating rules on right-hand sides where appropriate:

rev_l#2(z, z') -{ 1 }→ 1 + x10 + x8 :|: z = x8, x8 >= 0, z' = x10, x10 >= 0

(12) Obligation:

Complexity RNTS consisting of the following rules:

foldr#3(z) -{ 1 }→ 0 :|: z = 0
foldr#3(z) -{ 1 }→ 1 + 0 + x16 + foldr#3(x6) :|: z = 1 + x16 + x6, x6 >= 0, x16 >= 0
main(z) -{ 2 }→ step_x_f#1(0, x8, 0, 0) :|: x8 >= 0, z = 1 + x8 + 0
main(z) -{ 2 }→ step_x_f#1(0, x8, 1 + 0 + x16' + foldr#3(x6'), 0) :|: z = 1 + x8 + (1 + x16' + x6'), x8 >= 0, x6' >= 0, x16' >= 0
main(z) -{ 1 }→ 0 :|: z = 0
rev_l#2(z, z') -{ 1 }→ 1 + x10 + x8 :|: z = x8, x8 >= 0, z' = x10, x10 >= 0
step_x_f#1(z, z', z'', z1) -{ 2 }→ step_x_f#1(x2, x3, x4, 1 + x5 + x1) :|: x5 >= 0, x4 >= 0, x1 >= 0, z'' = 1 + x2 + x3 + x4, z1 = x1, z' = x5, z = 0, x2 >= 0, x3 >= 0
step_x_f#1(z, z', z'', z1) -{ 2 }→ 1 + x10 + x8 :|: z'' = 0, x5 >= 0, z' = x5, z1 = x3, z = 0, x3 >= 0, x3 = x8, x8 >= 0, x5 = x10, x10 >= 0

(13) SimplificationProof (BOTH BOUNDS(ID, ID) transformation)

Simplified the RNTS by moving equalities from the constraints into the right-hand sides.

(14) Obligation:

Complexity RNTS consisting of the following rules:

foldr#3(z) -{ 1 }→ 0 :|: z = 0
foldr#3(z) -{ 1 }→ 1 + 0 + x16 + foldr#3(x6) :|: z = 1 + x16 + x6, x6 >= 0, x16 >= 0
main(z) -{ 2 }→ step_x_f#1(0, x8, 1 + 0 + x16' + foldr#3(x6'), 0) :|: z = 1 + x8 + (1 + x16' + x6'), x8 >= 0, x6' >= 0, x16' >= 0
main(z) -{ 2 }→ step_x_f#1(0, z - 1, 0, 0) :|: z - 1 >= 0
main(z) -{ 1 }→ 0 :|: z = 0
rev_l#2(z, z') -{ 1 }→ 1 + z' + z :|: z >= 0, z' >= 0
step_x_f#1(z, z', z'', z1) -{ 2 }→ step_x_f#1(x2, x3, x4, 1 + z' + z1) :|: z' >= 0, x4 >= 0, z1 >= 0, z'' = 1 + x2 + x3 + x4, z = 0, x2 >= 0, x3 >= 0
step_x_f#1(z, z', z'', z1) -{ 2 }→ 1 + z' + z1 :|: z'' = 0, z' >= 0, z = 0, z1 >= 0

(15) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID) transformation)

Found the following analysis order by SCC decomposition:

{ rev_l#2 }
{ step_x_f#1 }
{ foldr#3 }
{ main }

(16) Obligation:

Complexity RNTS consisting of the following rules:

foldr#3(z) -{ 1 }→ 0 :|: z = 0
foldr#3(z) -{ 1 }→ 1 + 0 + x16 + foldr#3(x6) :|: z = 1 + x16 + x6, x6 >= 0, x16 >= 0
main(z) -{ 2 }→ step_x_f#1(0, x8, 1 + 0 + x16' + foldr#3(x6'), 0) :|: z = 1 + x8 + (1 + x16' + x6'), x8 >= 0, x6' >= 0, x16' >= 0
main(z) -{ 2 }→ step_x_f#1(0, z - 1, 0, 0) :|: z - 1 >= 0
main(z) -{ 1 }→ 0 :|: z = 0
rev_l#2(z, z') -{ 1 }→ 1 + z' + z :|: z >= 0, z' >= 0
step_x_f#1(z, z', z'', z1) -{ 2 }→ step_x_f#1(x2, x3, x4, 1 + z' + z1) :|: z' >= 0, x4 >= 0, z1 >= 0, z'' = 1 + x2 + x3 + x4, z = 0, x2 >= 0, x3 >= 0
step_x_f#1(z, z', z'', z1) -{ 2 }→ 1 + z' + z1 :|: z'' = 0, z' >= 0, z = 0, z1 >= 0

Function symbols to be analyzed: {rev_l#2}, {step_x_f#1}, {foldr#3}, {main}

(17) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: rev_l#2
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 1 + z + z'

(18) Obligation:

Complexity RNTS consisting of the following rules:

foldr#3(z) -{ 1 }→ 0 :|: z = 0
foldr#3(z) -{ 1 }→ 1 + 0 + x16 + foldr#3(x6) :|: z = 1 + x16 + x6, x6 >= 0, x16 >= 0
main(z) -{ 2 }→ step_x_f#1(0, x8, 1 + 0 + x16' + foldr#3(x6'), 0) :|: z = 1 + x8 + (1 + x16' + x6'), x8 >= 0, x6' >= 0, x16' >= 0
main(z) -{ 2 }→ step_x_f#1(0, z - 1, 0, 0) :|: z - 1 >= 0
main(z) -{ 1 }→ 0 :|: z = 0
rev_l#2(z, z') -{ 1 }→ 1 + z' + z :|: z >= 0, z' >= 0
step_x_f#1(z, z', z'', z1) -{ 2 }→ step_x_f#1(x2, x3, x4, 1 + z' + z1) :|: z' >= 0, x4 >= 0, z1 >= 0, z'' = 1 + x2 + x3 + x4, z = 0, x2 >= 0, x3 >= 0
step_x_f#1(z, z', z'', z1) -{ 2 }→ 1 + z' + z1 :|: z'' = 0, z' >= 0, z = 0, z1 >= 0

Function symbols to be analyzed: {rev_l#2}, {step_x_f#1}, {foldr#3}, {main}
Previous analysis results are:
rev_l#2: runtime: ?, size: O(n1) [1 + z + z']

(19) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: rev_l#2
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(20) Obligation:

Complexity RNTS consisting of the following rules:

foldr#3(z) -{ 1 }→ 0 :|: z = 0
foldr#3(z) -{ 1 }→ 1 + 0 + x16 + foldr#3(x6) :|: z = 1 + x16 + x6, x6 >= 0, x16 >= 0
main(z) -{ 2 }→ step_x_f#1(0, x8, 1 + 0 + x16' + foldr#3(x6'), 0) :|: z = 1 + x8 + (1 + x16' + x6'), x8 >= 0, x6' >= 0, x16' >= 0
main(z) -{ 2 }→ step_x_f#1(0, z - 1, 0, 0) :|: z - 1 >= 0
main(z) -{ 1 }→ 0 :|: z = 0
rev_l#2(z, z') -{ 1 }→ 1 + z' + z :|: z >= 0, z' >= 0
step_x_f#1(z, z', z'', z1) -{ 2 }→ step_x_f#1(x2, x3, x4, 1 + z' + z1) :|: z' >= 0, x4 >= 0, z1 >= 0, z'' = 1 + x2 + x3 + x4, z = 0, x2 >= 0, x3 >= 0
step_x_f#1(z, z', z'', z1) -{ 2 }→ 1 + z' + z1 :|: z'' = 0, z' >= 0, z = 0, z1 >= 0

Function symbols to be analyzed: {step_x_f#1}, {foldr#3}, {main}
Previous analysis results are:
rev_l#2: runtime: O(1) [1], size: O(n1) [1 + z + z']

(21) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(22) Obligation:

Complexity RNTS consisting of the following rules:

foldr#3(z) -{ 1 }→ 0 :|: z = 0
foldr#3(z) -{ 1 }→ 1 + 0 + x16 + foldr#3(x6) :|: z = 1 + x16 + x6, x6 >= 0, x16 >= 0
main(z) -{ 2 }→ step_x_f#1(0, x8, 1 + 0 + x16' + foldr#3(x6'), 0) :|: z = 1 + x8 + (1 + x16' + x6'), x8 >= 0, x6' >= 0, x16' >= 0
main(z) -{ 2 }→ step_x_f#1(0, z - 1, 0, 0) :|: z - 1 >= 0
main(z) -{ 1 }→ 0 :|: z = 0
rev_l#2(z, z') -{ 1 }→ 1 + z' + z :|: z >= 0, z' >= 0
step_x_f#1(z, z', z'', z1) -{ 2 }→ step_x_f#1(x2, x3, x4, 1 + z' + z1) :|: z' >= 0, x4 >= 0, z1 >= 0, z'' = 1 + x2 + x3 + x4, z = 0, x2 >= 0, x3 >= 0
step_x_f#1(z, z', z'', z1) -{ 2 }→ 1 + z' + z1 :|: z'' = 0, z' >= 0, z = 0, z1 >= 0

Function symbols to be analyzed: {step_x_f#1}, {foldr#3}, {main}
Previous analysis results are:
rev_l#2: runtime: O(1) [1], size: O(n1) [1 + z + z']

(23) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: step_x_f#1
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 1 + z' + z'' + z1

(24) Obligation:

Complexity RNTS consisting of the following rules:

foldr#3(z) -{ 1 }→ 0 :|: z = 0
foldr#3(z) -{ 1 }→ 1 + 0 + x16 + foldr#3(x6) :|: z = 1 + x16 + x6, x6 >= 0, x16 >= 0
main(z) -{ 2 }→ step_x_f#1(0, x8, 1 + 0 + x16' + foldr#3(x6'), 0) :|: z = 1 + x8 + (1 + x16' + x6'), x8 >= 0, x6' >= 0, x16' >= 0
main(z) -{ 2 }→ step_x_f#1(0, z - 1, 0, 0) :|: z - 1 >= 0
main(z) -{ 1 }→ 0 :|: z = 0
rev_l#2(z, z') -{ 1 }→ 1 + z' + z :|: z >= 0, z' >= 0
step_x_f#1(z, z', z'', z1) -{ 2 }→ step_x_f#1(x2, x3, x4, 1 + z' + z1) :|: z' >= 0, x4 >= 0, z1 >= 0, z'' = 1 + x2 + x3 + x4, z = 0, x2 >= 0, x3 >= 0
step_x_f#1(z, z', z'', z1) -{ 2 }→ 1 + z' + z1 :|: z'' = 0, z' >= 0, z = 0, z1 >= 0

Function symbols to be analyzed: {step_x_f#1}, {foldr#3}, {main}
Previous analysis results are:
rev_l#2: runtime: O(1) [1], size: O(n1) [1 + z + z']
step_x_f#1: runtime: ?, size: O(n1) [1 + z' + z'' + z1]

(25) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: step_x_f#1
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 2 + 2·z''

(26) Obligation:

Complexity RNTS consisting of the following rules:

foldr#3(z) -{ 1 }→ 0 :|: z = 0
foldr#3(z) -{ 1 }→ 1 + 0 + x16 + foldr#3(x6) :|: z = 1 + x16 + x6, x6 >= 0, x16 >= 0
main(z) -{ 2 }→ step_x_f#1(0, x8, 1 + 0 + x16' + foldr#3(x6'), 0) :|: z = 1 + x8 + (1 + x16' + x6'), x8 >= 0, x6' >= 0, x16' >= 0
main(z) -{ 2 }→ step_x_f#1(0, z - 1, 0, 0) :|: z - 1 >= 0
main(z) -{ 1 }→ 0 :|: z = 0
rev_l#2(z, z') -{ 1 }→ 1 + z' + z :|: z >= 0, z' >= 0
step_x_f#1(z, z', z'', z1) -{ 2 }→ step_x_f#1(x2, x3, x4, 1 + z' + z1) :|: z' >= 0, x4 >= 0, z1 >= 0, z'' = 1 + x2 + x3 + x4, z = 0, x2 >= 0, x3 >= 0
step_x_f#1(z, z', z'', z1) -{ 2 }→ 1 + z' + z1 :|: z'' = 0, z' >= 0, z = 0, z1 >= 0

Function symbols to be analyzed: {foldr#3}, {main}
Previous analysis results are:
rev_l#2: runtime: O(1) [1], size: O(n1) [1 + z + z']
step_x_f#1: runtime: O(n1) [2 + 2·z''], size: O(n1) [1 + z' + z'' + z1]

(27) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(28) Obligation:

Complexity RNTS consisting of the following rules:

foldr#3(z) -{ 1 }→ 0 :|: z = 0
foldr#3(z) -{ 1 }→ 1 + 0 + x16 + foldr#3(x6) :|: z = 1 + x16 + x6, x6 >= 0, x16 >= 0
main(z) -{ 4 }→ s' :|: s' >= 0, s' <= 1 * (z - 1) + 1 * 0 + 1 * 0 + 1, z - 1 >= 0
main(z) -{ 2 }→ step_x_f#1(0, x8, 1 + 0 + x16' + foldr#3(x6'), 0) :|: z = 1 + x8 + (1 + x16' + x6'), x8 >= 0, x6' >= 0, x16' >= 0
main(z) -{ 1 }→ 0 :|: z = 0
rev_l#2(z, z') -{ 1 }→ 1 + z' + z :|: z >= 0, z' >= 0
step_x_f#1(z, z', z'', z1) -{ 4 + 2·x4 }→ s :|: s >= 0, s <= 1 * x3 + 1 * x4 + 1 * (1 + z' + z1) + 1, z' >= 0, x4 >= 0, z1 >= 0, z'' = 1 + x2 + x3 + x4, z = 0, x2 >= 0, x3 >= 0
step_x_f#1(z, z', z'', z1) -{ 2 }→ 1 + z' + z1 :|: z'' = 0, z' >= 0, z = 0, z1 >= 0

Function symbols to be analyzed: {foldr#3}, {main}
Previous analysis results are:
rev_l#2: runtime: O(1) [1], size: O(n1) [1 + z + z']
step_x_f#1: runtime: O(n1) [2 + 2·z''], size: O(n1) [1 + z' + z'' + z1]

(29) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: foldr#3
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z

(30) Obligation:

Complexity RNTS consisting of the following rules:

foldr#3(z) -{ 1 }→ 0 :|: z = 0
foldr#3(z) -{ 1 }→ 1 + 0 + x16 + foldr#3(x6) :|: z = 1 + x16 + x6, x6 >= 0, x16 >= 0
main(z) -{ 4 }→ s' :|: s' >= 0, s' <= 1 * (z - 1) + 1 * 0 + 1 * 0 + 1, z - 1 >= 0
main(z) -{ 2 }→ step_x_f#1(0, x8, 1 + 0 + x16' + foldr#3(x6'), 0) :|: z = 1 + x8 + (1 + x16' + x6'), x8 >= 0, x6' >= 0, x16' >= 0
main(z) -{ 1 }→ 0 :|: z = 0
rev_l#2(z, z') -{ 1 }→ 1 + z' + z :|: z >= 0, z' >= 0
step_x_f#1(z, z', z'', z1) -{ 4 + 2·x4 }→ s :|: s >= 0, s <= 1 * x3 + 1 * x4 + 1 * (1 + z' + z1) + 1, z' >= 0, x4 >= 0, z1 >= 0, z'' = 1 + x2 + x3 + x4, z = 0, x2 >= 0, x3 >= 0
step_x_f#1(z, z', z'', z1) -{ 2 }→ 1 + z' + z1 :|: z'' = 0, z' >= 0, z = 0, z1 >= 0

Function symbols to be analyzed: {foldr#3}, {main}
Previous analysis results are:
rev_l#2: runtime: O(1) [1], size: O(n1) [1 + z + z']
step_x_f#1: runtime: O(n1) [2 + 2·z''], size: O(n1) [1 + z' + z'' + z1]
foldr#3: runtime: ?, size: O(n1) [z]

(31) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: foldr#3
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 1 + z

(32) Obligation:

Complexity RNTS consisting of the following rules:

foldr#3(z) -{ 1 }→ 0 :|: z = 0
foldr#3(z) -{ 1 }→ 1 + 0 + x16 + foldr#3(x6) :|: z = 1 + x16 + x6, x6 >= 0, x16 >= 0
main(z) -{ 4 }→ s' :|: s' >= 0, s' <= 1 * (z - 1) + 1 * 0 + 1 * 0 + 1, z - 1 >= 0
main(z) -{ 2 }→ step_x_f#1(0, x8, 1 + 0 + x16' + foldr#3(x6'), 0) :|: z = 1 + x8 + (1 + x16' + x6'), x8 >= 0, x6' >= 0, x16' >= 0
main(z) -{ 1 }→ 0 :|: z = 0
rev_l#2(z, z') -{ 1 }→ 1 + z' + z :|: z >= 0, z' >= 0
step_x_f#1(z, z', z'', z1) -{ 4 + 2·x4 }→ s :|: s >= 0, s <= 1 * x3 + 1 * x4 + 1 * (1 + z' + z1) + 1, z' >= 0, x4 >= 0, z1 >= 0, z'' = 1 + x2 + x3 + x4, z = 0, x2 >= 0, x3 >= 0
step_x_f#1(z, z', z'', z1) -{ 2 }→ 1 + z' + z1 :|: z'' = 0, z' >= 0, z = 0, z1 >= 0

Function symbols to be analyzed: {main}
Previous analysis results are:
rev_l#2: runtime: O(1) [1], size: O(n1) [1 + z + z']
step_x_f#1: runtime: O(n1) [2 + 2·z''], size: O(n1) [1 + z' + z'' + z1]
foldr#3: runtime: O(n1) [1 + z], size: O(n1) [z]

(33) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(34) Obligation:

Complexity RNTS consisting of the following rules:

foldr#3(z) -{ 1 }→ 0 :|: z = 0
foldr#3(z) -{ 2 + x6 }→ 1 + 0 + x16 + s'' :|: s'' >= 0, s'' <= 1 * x6, z = 1 + x16 + x6, x6 >= 0, x16 >= 0
main(z) -{ 4 }→ s' :|: s' >= 0, s' <= 1 * (z - 1) + 1 * 0 + 1 * 0 + 1, z - 1 >= 0
main(z) -{ 7 + 2·s1 + 2·x16' + x6' }→ s2 :|: s1 >= 0, s1 <= 1 * x6', s2 >= 0, s2 <= 1 * x8 + 1 * (1 + 0 + x16' + s1) + 1 * 0 + 1, z = 1 + x8 + (1 + x16' + x6'), x8 >= 0, x6' >= 0, x16' >= 0
main(z) -{ 1 }→ 0 :|: z = 0
rev_l#2(z, z') -{ 1 }→ 1 + z' + z :|: z >= 0, z' >= 0
step_x_f#1(z, z', z'', z1) -{ 4 + 2·x4 }→ s :|: s >= 0, s <= 1 * x3 + 1 * x4 + 1 * (1 + z' + z1) + 1, z' >= 0, x4 >= 0, z1 >= 0, z'' = 1 + x2 + x3 + x4, z = 0, x2 >= 0, x3 >= 0
step_x_f#1(z, z', z'', z1) -{ 2 }→ 1 + z' + z1 :|: z'' = 0, z' >= 0, z = 0, z1 >= 0

Function symbols to be analyzed: {main}
Previous analysis results are:
rev_l#2: runtime: O(1) [1], size: O(n1) [1 + z + z']
step_x_f#1: runtime: O(n1) [2 + 2·z''], size: O(n1) [1 + z' + z'' + z1]
foldr#3: runtime: O(n1) [1 + z], size: O(n1) [z]

(35) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: main
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z

(36) Obligation:

Complexity RNTS consisting of the following rules:

foldr#3(z) -{ 1 }→ 0 :|: z = 0
foldr#3(z) -{ 2 + x6 }→ 1 + 0 + x16 + s'' :|: s'' >= 0, s'' <= 1 * x6, z = 1 + x16 + x6, x6 >= 0, x16 >= 0
main(z) -{ 4 }→ s' :|: s' >= 0, s' <= 1 * (z - 1) + 1 * 0 + 1 * 0 + 1, z - 1 >= 0
main(z) -{ 7 + 2·s1 + 2·x16' + x6' }→ s2 :|: s1 >= 0, s1 <= 1 * x6', s2 >= 0, s2 <= 1 * x8 + 1 * (1 + 0 + x16' + s1) + 1 * 0 + 1, z = 1 + x8 + (1 + x16' + x6'), x8 >= 0, x6' >= 0, x16' >= 0
main(z) -{ 1 }→ 0 :|: z = 0
rev_l#2(z, z') -{ 1 }→ 1 + z' + z :|: z >= 0, z' >= 0
step_x_f#1(z, z', z'', z1) -{ 4 + 2·x4 }→ s :|: s >= 0, s <= 1 * x3 + 1 * x4 + 1 * (1 + z' + z1) + 1, z' >= 0, x4 >= 0, z1 >= 0, z'' = 1 + x2 + x3 + x4, z = 0, x2 >= 0, x3 >= 0
step_x_f#1(z, z', z'', z1) -{ 2 }→ 1 + z' + z1 :|: z'' = 0, z' >= 0, z = 0, z1 >= 0

Function symbols to be analyzed: {main}
Previous analysis results are:
rev_l#2: runtime: O(1) [1], size: O(n1) [1 + z + z']
step_x_f#1: runtime: O(n1) [2 + 2·z''], size: O(n1) [1 + z' + z'' + z1]
foldr#3: runtime: O(n1) [1 + z], size: O(n1) [z]
main: runtime: ?, size: O(n1) [z]

(37) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: main
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 4 + 3·z

(38) Obligation:

Complexity RNTS consisting of the following rules:

foldr#3(z) -{ 1 }→ 0 :|: z = 0
foldr#3(z) -{ 2 + x6 }→ 1 + 0 + x16 + s'' :|: s'' >= 0, s'' <= 1 * x6, z = 1 + x16 + x6, x6 >= 0, x16 >= 0
main(z) -{ 4 }→ s' :|: s' >= 0, s' <= 1 * (z - 1) + 1 * 0 + 1 * 0 + 1, z - 1 >= 0
main(z) -{ 7 + 2·s1 + 2·x16' + x6' }→ s2 :|: s1 >= 0, s1 <= 1 * x6', s2 >= 0, s2 <= 1 * x8 + 1 * (1 + 0 + x16' + s1) + 1 * 0 + 1, z = 1 + x8 + (1 + x16' + x6'), x8 >= 0, x6' >= 0, x16' >= 0
main(z) -{ 1 }→ 0 :|: z = 0
rev_l#2(z, z') -{ 1 }→ 1 + z' + z :|: z >= 0, z' >= 0
step_x_f#1(z, z', z'', z1) -{ 4 + 2·x4 }→ s :|: s >= 0, s <= 1 * x3 + 1 * x4 + 1 * (1 + z' + z1) + 1, z' >= 0, x4 >= 0, z1 >= 0, z'' = 1 + x2 + x3 + x4, z = 0, x2 >= 0, x3 >= 0
step_x_f#1(z, z', z'', z1) -{ 2 }→ 1 + z' + z1 :|: z'' = 0, z' >= 0, z = 0, z1 >= 0

Function symbols to be analyzed:
Previous analysis results are:
rev_l#2: runtime: O(1) [1], size: O(n1) [1 + z + z']
step_x_f#1: runtime: O(n1) [2 + 2·z''], size: O(n1) [1 + z' + z'' + z1]
foldr#3: runtime: O(n1) [1 + z], size: O(n1) [z]
main: runtime: O(n1) [4 + 3·z], size: O(n1) [z]

(39) FinalProof (EQUIVALENT transformation)

Computed overall runtime complexity

(40) BOUNDS(1, n^1)